Do not filter out small scroll event fractions
authorAndreas Pokorny <andreas.pokorny@canonical.com>
Sat, 13 Aug 2016 23:29:35 +0000 (01:29 +0200)
committerWilliam Hua <william.hua@canonical.com>
Mon, 26 Sep 2016 15:49:56 +0000 (11:49 -0400)
The scroll motion values are subject of batching and scaling. Either
through scaling or by using a touchpad smooth scroll motion changes
below 0.5 are possible.

https://bugzilla.gnome.org/show_bug.cgi?id=769554

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
gdk/mir/gdkmireventsource.c

index b36306216795b203512e5906b2da28f26cce4589..8c7e1063706a3dbde95768e50e6e1e7fd33b2157 100644 (file)
@@ -196,7 +196,7 @@ generate_scroll_event (GdkWindow *window, gdouble x, gdouble y, gdouble delta_x,
   else
     {
       event->scroll.direction = GDK_SCROLL_SMOOTH;
-      event->scroll.delta_x = -delta_x;
+      event->scroll.delta_x = delta_x;
       event->scroll.delta_y = -delta_y;
     }
 
@@ -403,7 +403,7 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
           hscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_hscroll);
           vscroll = mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_vscroll);
 
-          if (ABS (hscroll) > 0.5 || ABS (vscroll) > 0.5)
+          if (hscroll != 0.0 || vscroll != 0.0)
             generate_scroll_event (window, x, y, hscroll, vscroll, modifier_state, event_time);
           if (ABS (new_x - x) > 0.5 || ABS (new_y - y) > 0.5)
             {